package com.itlaobing.spring.ioc.instantiating;

import java.util.Date;
import java.util.logging.Logger;

public class Human {

    private static Logger logger = Logger.getLogger( Human.class.getName() );

    private Integer id ; // 对象标识(zhi)符字段 ( Object Identifier Field )
    private String name ; // 用来保存姓名的字段
    private char gender ; // 用来保存性别的字段
    private Date birthdate ; // 用来保存 出生年月 对应的 Date 对象
    private boolean married ; // 用来表示是否已婚的字段 ( true 表示已婚 ；false 表示未婚 )

    public Human() {
        super();
        logger.info( "Human()" );
    }

    public Human(Integer id, String name, char gender) {
        super();
        logger.info( "Human(Integer,String,char)" );
        this.id = id;
        this.name = name;
        this.gender = gender;
    }

    public Human(Integer id, String name, char gender, Date birthdate, boolean married) {
        super();
        logger.info( "Human(Integer,String,char,Date,boolean)" );
        this.id = id;
        this.name = name;
        this.gender = gender;
        this.birthdate = birthdate;
        this.married = married;
    }

    @Override
    public String toString() {
        return "Human{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", gender=" + gender +
                ", birthdate=" + birthdate +
                ", married=" + married +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    public Date getBirthdate() {
        return birthdate;
    }

    public void setBirthdate(Date birthdate) {
        this.birthdate = birthdate;
    }

    public boolean isMarried() {
        return married;
    }

    public void setMarried(boolean married) {
        this.married = married;
    }
}
